import 'friend_model.dart';
import 'message_model.dart';

class ChatModel {

  Friend friend;

  Message message;

  bool newMessage; // 有没有新消息

  ChatModel({this.friend, this.message, this.newMessage = false});

  @override
  String toString() {
    return 'ChatModel{friend: $friend, message: $message}';
  }

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
          other is ChatModel &&
              runtimeType == other.runtimeType &&
              friend.id == other.friend.id;
  @override
  int get hashCode =>
      friend.id.hashCode;



}